#ifndef __VCOM_H
#define __VCOM_H

#include "rtthread.h"

#pragma pack(1)
struct Vision_Send_s
{
  rt_uint8_t header ;
  rt_uint8_t mode;
  float roll;
  float pitch;
  float yaw;
  rt_uint8_t check_byte;
  rt_uint8_t end ;

};
#pragma pack() // 开启字节对齐,结束前面的#pragma pack(1)
extern struct Vision_Send_s Vision_Send;

#pragma pack(1)
struct Nav_Send_s
{
  rt_uint8_t header ;
  uint16_t current_hp_percent; // 机器人当前血量百分比
  uint8_t game_progress; // 游戏进度
  uint8_t event_supply_area_rmuc; 
  uint8_t event_supply_area_rmul; 
  uint8_t event_center_aera_rmul; 
  rt_uint8_t end ;
};
#pragma pack() // 开启字节对齐,结束前面的#pragma pack(1)
extern struct Nav_Send_s Nav_Send;

#pragma pack(1)
struct Vision_Recv_s
{
  rt_uint8_t header ;
  rt_uint8_t fire_advice;
  float pitch;
  float yaw;
  float distance;
  rt_uint8_t check_byte;
  rt_uint8_t end ;
};
#pragma pack() // 开启字节对齐,结束前面的#pragma pack(1)
extern struct Vision_Recv_s Vision_Recv;

#pragma pack(1)
struct Nav_Recv_s
{
  uint8_t header; 
  uint8_t nav_state;
  float vx;
  float vy;
  float wz;
  uint8_t tail;
};
#pragma pack() // 开启字节对齐,结束前面的#pragma pack(1)
extern struct Nav_Recv_s Nav_Recv;

void vision_send_process(const struct Vision_Send_s *vision_send);
void nav_send_process(const struct Nav_Send_s *nav_send);


#endif

